fix js syntax issue