Fixed running headless tests.