fix regeression, store only an entity if there is changes