I could think that it is why led on port a is not turning on, but what about led on port d.

I have to leave to work now but I will defenetaly try your suggestion when I get back tonight.