Fix javascript errors which prevented importes auto complete feature to ...

...work correctly

fixes #50