I had tested the code as is (mister-e's code I mean) and worked first time with no problem.

Maybe your troubles are in the PC side? Can you test on another PC?

Ioannis