Bugfix: changed undefined variable to boolean

Bugfix: changed undefined variable to boolean