fix bug in add new entry