issue #621
fixed issue #635