check if allocation_pool_* is defined

and a bugfix