fix more bugs for version 1.0