Fix write animations' order