fix javascript errors while loading the page
Merge pull request #16 from eriksson/master

fix javascript errors while loading the page