Can you post all the code? I suppose you cut and paste a part of it, right?

Ioannis