Should post code as text between CODE tags so readers can copy/paste it - not image. Can edit your post.

Have you step debugged?