Fixed the problem on converting NSString to unsigned char