Fix source repo calculation