Add fix from branch 3.4