if you have leds that illuminate on power up before the pins have been set as outputs then you are doing something very odd
or you have broken something

schematic and code ?