fixing corruption/values working for minmax
merge fix from corruption