make connection limit global & fixes