Fixed a bug in the assignment of loads to buses.