fixing reference to non-existent variable