fixed the for loop in editMem function to correctly populate the checkboxes when editing a single memory