Fix issue #2266