fixes for issue #41