Settings page, problem with logic