Bug fixes for recently reported small bugs

Issue numbers referenced from commits.

@morganpackard Take a look when you get a chance. Fairly small changes.