fix bug for adding cow group