fix bugs in pool and some waring