fixes for issue #121