Fix animation change with open inventory

Fix #1627