Fix incorrect config setting logic