Backport fix for #202