Fixed chatRepository instantiation