If you are simulating it as seen in your schematic, then the simulator might be giving false simulation because you do not have resistors on the leds.

I say this is 98% possibility of the error you are getting.

------------------