Fixed bug in teachers controller