Fixed uid generator when pool is changed