Fix some animation bugs