add #427 fix to 2.2. branch