Fix issue #1839