fixed bug in removing entries