Fix bug when window resize during crop