Small fix to headless mode