correcting exception: removing outdated variable reference