Carving: More fixes for headless support.