fix cross browser bugs