Bug fix in Javascript

Cancelled