Minor changes to avatar animation code