Fixes for issue #76