fixes for issue #20