Generic repository fix