Fixed Firefox compatibility issues.