Possible segmentation fault in string conversion corrected