py3 fix for animation, thanks to blarghmatey for reporting