Fix issue #151

I've check with unit test my changes.