fixed 'undefined variables in initializer' error