Backport #246