fix issue #1581