Fix issue in nested objects

Make sure we get the last object back when adding to it