Brings code more in line with upstream