bugfix for undefined variable
bugfix for undefined variable