Re-implement a couple of difference against upstream trunk as they don't make this branch any better