=sam #15368 Introduce @patriknw's and @drewhk's fixes