Fix error when save entity with empty fields