Bugfix min max calculations
Report generation optimized