This modifies the opt input argument, which shouldn't be done.