Few fixes with statistics and added function to conf