Fixes for issue #224