Fixed deleteAll method