Fixed bug in onAdded. Empty objects don't have any field.