fixing animation overflow