[Modded for fixing weird hiding animation issues]