wait for ending animation before reloading