mostly cross-browser fixes