Small fixes

Here are a couple of small fixes I needed as I am trying to get the test to run on Mac OS X 10.7.5.