Pr headless bug fixes