backport #36 fix in 2.2 just in case since it's trivially easy to patch