You know what, i just solved it. It was something stupid. Just in case someone wants to know how i fix it.
The problem was that i was using glGetActiveUniform as the location index. which i should have know better,but to use glGetUniformLocation because the prior one does not handle uniform locations. Dumb me.