Fix bug in lab 3 solution