Fix header-only logic