please use ``!header_sent()`` here