Fixing headless error