Fixed a bug related with  deleting values