Fixed animation issue when mouse is moving