.delete() and .clear() methods; internal method for errors