Fix FireFox hanging problem