Fix error in utility function.