Fixed memory leaks in loadbalancer