Tidy and fix for Firefox