Added a graceful fallback for firefox.