Bug fixes with unset variables pt. 2

Fixed line 14