on a windows machine the above would stick a backwards slash in the middle  if all you are trying to do is return  secret ref payload  to be used in a url  could you just do join  secret ref payload  or something similar 