misc issues fixed

see commit messages for details