js syntax fixes