Firefox compatability fixes