Using function put_var in callapi truncates text