Fixes for issue #97