fixed some bugs with objective-c vs. c strings