Fix errors in Teachers controller