Added support for more than 255 animations.