Fix max type.