Fixes for issue #3