fix issue #369
pull request #370