fix bug where last annotation doesnt belong to a group