Fixed wrong response on adding or editting objects.
Fixed objects not being saved.