Fixed persistence problem with repositories.