fixed Issue #591