Fixed bug in delete_all()