fixed Issue #594