Fix resize skipping getting stuck in inf loop