fixed bug concerning deletion