setting checkboxes were not properly storing and saving the values