Fix/3.x/issue 2721