Fixes for issue #45.