fixed issue where objects inside lists were not built properly and added
test for it