Fixed animation overflow problem