Fixed issue with MySQLdb and connection pooling