Fix incorrectly saving settings before confirming