fix issue #371