bug fix js