fix a bug in issue #111