correct bug in teachers controller