Fixed a Notice caused by relying on an undeclared variable