Restore timeout and wrap the looping in an autorelease pool