Fixed problem with looping after build failures