Fixed the connection limit issue with a better solution