Backport #496 fix for 2.3.4