fixes this to work with firefox background scripts;