Fix headless operation.