special case fix 

found this issue on uwhpsc course:
https://class.coursera.org/scicomp-001/class/index

Thanks for your work