fix some cross browser issues