fix the "too many connections" bug.