Fixed string parsing in ShareFunction