fix js for firefox