patch for commit 9af3b12a620ccd60ee4d3c4499acfd3bdc431f7f