Tweaks for Firefox compatibility