Fix broken student and groups DB interaction