fix Issue #313