added check to only set preUpdate vars once