fix bug in issue #35