fix bugs from merging atutor changes.