4051 troubles

Grumpy_Mike:
You are not defining pins 11, 12, and 13 as outputs.

Wow. Can't believe I forgot that... All that trouble, just to find out that it was a stupid mistake like that. Well, all is working good now! Thanks everybody!