fix the OSX private key select bug and make some things more clear

See commit messages for changes.