went on to make 10 appearances during the loan agreement. Foster returned to his parent club, but failed to make any first-team appearances, and was subsequently loaned out to Conference North club Alfreton Town in February 2005 until the end of the season. He made his Alfreton debut in the club's 3–0 victory against Woking in the FA Trophy. He scored his first goal for the club in a 3–1 defeat against Southport. Foster played his last game for the club in the final game of the 2004–05 season, a 3–1 loss at Stafford Rangers. He played in 19 games for the club during the loan spell, scoring three goals. On his return to Sheffield Wednesday in May 2005, Foster was released and later joined League Two club Lincoln City on a one-year contract ahead of the 2005–06 season. Foster made his debut for Lincoln in the club's first game of the season, a 2–1 defeat to Notts County. He played sporadically throughout the campaign, and made 17 appearances, scoring once in a 5–0 win against Grimsby Town on 25 March 2006. Despite playing a peripheral role during the campaign, Foster signed a one-year contract extension at the end of the season. However, Foster did not play again for Lincoln during the 2006–07 campaign and, after training with York City, he joined the Conference National club on a one-month emergency loan on 5 October 2006 due to injuries to defenders. He made his debut for the club in a 1–0 win against Aldershot Town. This loan deal was extended for a second month on 3 November 2006, but after Foster suffered an ankle injury during the last week of the loan, he returned to his parent club on 4 December 2006. He made his last appearance for York in the club's 1–0 defeat to League One team Bristol City in the FA Cup first round. He made seven appearances for York during a two-month loan spell with the club. Foster returned to Lincoln in December, and a month later was told by the club that he was free to find another club after being told he was not part of the club's first-team plans. He subsequently mutually agreed to cancel his contract with Lincoln in January 2007, enabling him to join Conference North club Stalybridge Celtic on a free transfer. He made his debut for Stalybridge in the FA Trophy,