Well, I didn't try to investigate the problem, just threw this in to point it out.
Good thing you could find the real problem.