Fixes for issue #19