fix headless compile