Fixed problem with calculate min/max losses in statistics