Fix to Javascript