A few minor fixes

I made a few minor fixes. Please take a look at the two commits.