Fixes for firefox compatibility