fix js problems