fixed #26 (not working in Waterfox)