Undef packages was caused by using the variable by its previous name