Fix js code