** Added tests to replicate issue #157
** Fixed issue #157