Fixes Firefox compatibility issues