fixed 100% cpu usage issue on firefox