fixed bug in delete buttons