Fixed error in repositories controller, which happened after my refactoring of the controllers yesterday.