fix issue #313