Corrected bugs in load balancing