Fix for issue #158

Fix for issue #158.
Change the tests accordingly