Applied upstream 3.2.21 patch