Fix some bugs about ObjectManager