Cleared memmory before storing the results. Should get rid of the results error in output.