Fixed bug in pool selection