minmax in 16 and 8 bit is working too