Fix & refactory in generic repository
async