fix bugs in lessons controller