Another fix to avoid losing nested objects