remove extra space from retrieval requests