A few fixes

A few things I noticed as I went through the code :)