Fixed a bunch of bugs with animations and undo/reset