Fixed last stage referencing bug