Minor fixes

I had to make a few changes to get this to work in my repo.  Not sure what the differences between our setups are.  Have a look and pull them upstream if it makes sense.