Fix issue 476

Possible solution to fix this bug.
I only tested it with Python and now my Chrome Canary Version 33.0.1737.0 works as expected.
If this solution is accepted, how shall I fix it for other languages?