headless support, bug fixing