Fix for issue #3

Could not get tests to work for some reason, but my own functional tests in my application worked fine with this change.