onEndBuild bug