Fix failed build not showing proper phase due to wrong job id being used