Fixed bug where self was undefined if animation turned off