Fixed my code.

Fixed the code so it actually saves the data.