fix js dialog