Creating a structure to save to (bug fix)