fixed Issue #845