If it's not something obvious, it must be a driver/OS issue, as Sledge mentions.
I've never experienced this before myself, though - the code posted by the OP should work fine.
I've never experienced this before myself, though - the code posted by the OP should work fine.