Fixed animation transition after pressing keys