Fix issue #1043