Fixing Firefox compatibility issue