fixes for issue #5