Fix total weight calculation
Fix granularity