Fixed issues with the lesson navigation code.