Merge 5.x changes