fixing annotations for generic classes