Fixing wrong string name in javascript, and delaying drawing until javas...

...cript has drawn.