fixed bug (coursera)