fix more bugs, thanks Kyle