Fix Selenium bugs in new firefox