fixed #157 for firefox.