allows min and max to work also in projections
Merge pull request #1415 from pellyadolfo/master

allows max and min functions to work also in projections