fix issue #246