backport #324 fix for 2.2.4