Fix error with null variable

Hey,

I was getting a `Undefined variable: xxx` error without this fix.