Added more checks to see if we have valid build.