Minor bug, undefined var

Discovered by Alex
Minor bug, undefined var

Found by Alex