Merge pull request #1 from spekary/bugfix-drawingProblems

Fixing javascript string problem, and delaying drawying until javascript draws.