Fixed bug in storage of pool id