Task 3: bug fix