Fix issue #12

BTW: since fixing bugs in this library benefits everyone taking this course (and possibly future generations of students), we think it's a good cause for some extra credit :)