fix more bugs, error is incompatible pointer type