diff --git a/libs/MST/NetworkInfo.pm b/libs/MST/NetworkInfo.pm
index 4c2ac2a3137a36ef6e14c0c5a6ca4d43d7c62eb8..55d5be5ca317843e0d4d7a6da33529fb3efaf0d7 100644
--- a/libs/MST/NetworkInfo.pm
+++ b/libs/MST/NetworkInfo.pm
@@ -145,7 +145,7 @@ sub IPToInteger {
 
     &LogAPIUsage();
 
-    my @ip = split( /\./, $ip );
+    my @ip  = split( /\./, $ip );
     my $res = $ip[0] * 256 * 256 * 256 + $ip[1] * 256 * 256 + $ip[2] * 256 + $ip[3];
 
     return $res;
@@ -295,7 +295,7 @@ sub HostToOwner {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleUserRPC();
+    my $rpc  = $self->SimpleUserRPC();
     my $info = $rpc->HostToOwner( host => $host );
     return $info->{$host};
 }
@@ -335,7 +335,7 @@ sub OwnerToHosts {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleUserRPC();
+    my $rpc  = $self->SimpleUserRPC();
     my $info = $rpc->OwnerToHosts( userid => $userid );
     return $info->{$userid};
 }
@@ -374,7 +374,7 @@ sub HostToEther {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleUserRPC();
+    my $rpc  = $self->SimpleUserRPC();
     my $info = $rpc->HostToEther( host => $host );
     return @{ $info->{$host} };
 }
@@ -414,7 +414,7 @@ sub EtherToHost {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleUserRPC();
+    my $rpc  = $self->SimpleUserRPC();
     my $info = $rpc->EtherToHost( ether => $ether );
     return $info->{$ether};
 }
@@ -431,7 +431,7 @@ sub LastLeaseToEther {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleUserRPC();
+    my $rpc  = $self->SimpleUserRPC();
     my $info = $rpc->LastLeaseToEther( ip => $ip );
     return $info->{$ip};
 }
@@ -471,7 +471,7 @@ sub LastLeaseToHost {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleUserRPC();
+    my $rpc  = $self->SimpleUserRPC();
     my $info = $rpc->LastLeaseToHost( ip => $ip );
     return $info->{$ip};
 }
@@ -515,7 +515,7 @@ sub MatchPartialHost {
         return ();
     }
 
-    my $rpc = $self->SimpleUserRPC();
+    my $rpc  = $self->SimpleUserRPC();
     my $info = $rpc->MatchPartialHost( host => $pat );
     return @$info;
 }
@@ -532,7 +532,7 @@ sub ValidFQDN {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleUserRPC();
+    my $rpc  = $self->SimpleUserRPC();
     my $info = $rpc->Exists( host => $host );
     return $info->{$host};
 }
@@ -731,7 +731,7 @@ sub GetAddressNetworkInfo {
                 address   => $addr,
                 netmask   => $mask,
                 network   => $snaddr,
-                gateway   => $self->MakeGatewayAddress( $snaddr, $mask ),
+                gateway   => $subnets->{$sname}->{gateway},
                 broadcast => $self->MakeBroadcastAddress( $snaddr, $mask ),
             );
         }
@@ -752,7 +752,7 @@ sub GetHostLocation {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleAdminRPC();
+    my $rpc  = $self->SimpleAdminRPC();
     my $info = $rpc->GetHostLocation( host => $host );
     return $info->{$host}->{location};
 }
@@ -769,7 +769,7 @@ sub GetHostDescription {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleAdminRPC();
+    my $rpc  = $self->SimpleAdminRPC();
     my $info = $rpc->GetHostDescription( host => $host );
     return $info->{$host}->{description};
 }
@@ -1127,7 +1127,7 @@ sub GetAdminComment {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleAdminRPC();
+    my $rpc  = $self->SimpleAdminRPC();
     my $info = $rpc->GetAdminComment( host => $host );
     return $info->{$host};
 }
@@ -1162,7 +1162,7 @@ sub GetHostMetadataField {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleAdminRPC();
+    my $rpc  = $self->SimpleAdminRPC();
     my $info = $rpc->GetHostMetadataField( host => $host, field => $field );
     return $info->{$host}->{$field};
 }
@@ -1180,7 +1180,7 @@ sub GetHostMetadataFieldAll {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleAdminRPC();
+    my $rpc  = $self->SimpleAdminRPC();
     my $info = $rpc->GetHostMetadataFieldAll( field => $field );
     return $info;
 }
@@ -1199,7 +1199,7 @@ sub SetHostMetadataField {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleAdminRPC();
+    my $rpc  = $self->SimpleAdminRPC();
     my $info = $rpc->SetHostMetadataField( host => $host, field => $field, value => $value );
     return undef;
 }
@@ -1216,7 +1216,7 @@ sub GetAdminLock {
 
     &LogAPIUsage();
 
-    my $rpc = $self->SimpleAdminRPC();
+    my $rpc  = $self->SimpleAdminRPC();
     my $info = $rpc->GetAdminLock( host => $host );
     return $info->{$host};
 }