fixing bug when deleting multiple buckets