Two fixes for autobuilder