Fix settings logic