fix js syntax