Perhaps this bit should be in a separate patch file?