Fixes for issue #360