Resubmitting fix for issue #224 (fixed unit test)

Fix for issue #224