Bug fixes in the exercise