fixing errors in the maxref's