fix undeclared error