fixes for repositories to allow for a shared context