Working on saving settings

throws an exception