bugfixes for firefox/chrome