Fixed the bug in finding an object inside the scene