Fix issue #1216

Fixed #1216