Fixed bug that used old package variable