Fix for issue #173

This is my proposed fix.