fixed NVL - aggregation bug