Selenium fixes and improvements