Fix jittery animation