Applying pull request b1c9cbc622442475fef2aaef0d13ef4f52826613 manually.