fix undeclared errors