fixed Issue #522