fixed animation bugs via a clever hack