Fixing some bugs from lab 1.