diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm
index ed3c6096178c2235f801e36fcb37dbd8b420f9ed..0bdc94b4f56415e1bd8e6e45da318aa8d0261ccf 100755
--- a/lib/IdPAccountManager/WebRequest.pm
+++ b/lib/IdPAccountManager/WebRequest.pm
@@ -101,20 +101,19 @@ sub execute {
     }
 
     # Check the requested action
-    $self->{action} = $parameters{action} || 'home';
+    my $action = $parameters{action} || 'home';
 
-    if (defined $self->actions->{ $self->{action} }) {
+    if ($self->{actions}->{$action}) {
         ## Execute the target subroutine named req_actionName
         no strict 'refs';
-        my $sub = 'req_' . $self->{action};
+        my $sub = 'req_' . $action;
         $status = &{$sub}($self);
     } else {
-        ## Inknown action
+        ## inknown action
         push @{ $self->{param_out}->{errors} }, "unknown_action";
         $self->{logger}->log(
             level   => LOG_ERROR,
-            message => "Unknown action '%s'",
-            $self->{action}
+            message => "Unknown action '$action'"
         );
 
     }