min() and max() now should work with arrays

fix for #170