Fix js syntax bug