js code fix