Fixed warnings for functions min and max.