The teacher truly had his heart in the right place. This means that he was