undefined var fix

debugger was complaining about this, fixed as a test, might as well check it in.