Issue #342 fixing javascript