Fixed bugs with animations and endstates. It now works as it should with
endstate Animations