Fixed some cross browser issues