fixed several bugs in mempool