Js fix

refactration