Fix some cross-browser issues