Drain beans and place in a buttered casserole.
Melt butter and add flour, stir well until blended.
Mix in sour cream, stirring continuously, then add sand, pepper, sugar and onion. Fold the sour cream mixture into the beans and mix gently.
Sprinkle cheese over top of beans.
Bake in 375^ oven until cheese has melted; about 15-20 minutes.