Changed FirtOrDefault to SingleOrDefault where needed