fix alerts on lesson and use $timeout