fix bug: don't save entity if entity not exists
merge