Bug fix in pool.py