Fix issue #246