These changes are nothing to do with PETSc. Should be merged via other PR.