Fixing refresh_diff_distribution bug