fixed Issue #836