Added fix for running out of connections. Needs specs adding!