prevent undeclared variable bug