Fixed issue #377