added some check to addAnimationSetup as wrong start or endframe can crash tdme