Corrected get object logic and added comment