fix bug in pool