Remove ensureOpen(), slightly modify reset() as per comment.