Fixed assignment 1 runtime error