fixed js branching issue
fixed #288
forgot two files
Merge pull request #290 from etosch/untested

Untested