more backporting from PR