found and maybe fixed a possible bug in the teaching mechanism