Cancel close animation working properly