Fix bugs in MessageManager
Fix bugs in object pool