Fixed error in assignment 6