Backport #3 fix into 2.2 branch for possible 2.2.4 release