Fix potential bug with RESTAdapter.