fix bug in issue #104