fix js syntax bug