fixes for issue #7