Fixed both UTF-8 encoding problem and self-edge problem in group API.