Added sanity checks for min