Fix error in build record creation