Fixes for issue #180