fix errors in tutorial controller