Fixing small error with unset variable