Bugfixes from previous commit; commented out AVG aggregation policy which was giving troubles for string types