fix headless application and autobuild