Exercise 4c bug fixes