Headless bug fixes