Fixed issue where NSString was used incorrectly in place of C string