fix get client options for request, and some clean up