fixed delete

was not working properly before