Fix errors in build