fixed a bug that stores the known objects with depth >=2