Fixed the tests to run in headless mode