Fixed hiding animation bug.

This fixes the issue that I reported on your repository.