Fix StateAnim lifetime bug (#563)

#563