Fix up some problems when the animation duration is zero

We want to be able to suppress animations by making the duration zero