Bug in delete_group. Always deletes first group