[Issue #359] fixed code