fix issue #1182