diff --git a/moco-core/src/main/java/com/github/dreamhead/moco/handler/AbstractProxyResponseHandler.java b/moco-core/src/main/java/com/github/dreamhead/moco/handler/AbstractProxyResponseHandler.java
index <HASH>..<HASH> 100644
--- a/moco-core/src/main/java/com/github/dreamhead/moco/handler/AbstractProxyResponseHandler.java
+++ b/moco-core/src/main/java/com/github/dreamhead/moco/handler/AbstractProxyResponseHandler.java
@@ -286,7 +286,7 @@ public abstract class AbstractProxyResponseHandler extends AbstractHttpResponseH
 
     private Optional<URL> remoteUrl(final HttpRequest request) {
         Optional<String> remoteUrl = this.doRemoteUrl(request);
-        return remoteUrl.flatMap(actual -> doGetRemoteUrl(request, remoteUrl.get()));
+        return remoteUrl.flatMap(actual -> doGetRemoteUrl(request, actual));
     }
 
     private Optional<URL> doGetRemoteUrl(final HttpRequest request, final String actual) {
simplified remote url in abstract proxy response handler