Small cleanup to mid-util.c