(cherry picked from commit 4e505128a5b8d7f916a330bc0fef883da04a441b) (cherry picked from commit 511b127bb36baed787da7cf2d88549bd14e5d0a9) Co-authored-by: Stian Thorgersen <stianst@gmail.com>