fix more bugs

All bugs listed in Evernote are supposed to be fixed now.