Fixed Issue #40.

I applied the suggested change everywhere required, all tests pass.