Add support to min/max functions