Fixed the failing repository tests as per the comments