fix js exception