Manually applying #339