fixing grant api, channel name encoding issue