Reference variables need to be reset somehow