Ok now I fixed the gmin gmax error.  (Famous last words)