diff --git a/acceptance/openstack/compute/v2/servers_test.go b/acceptance/openstack/compute/v2/servers_test.go
index f5e800f..e1579ce 100644
--- a/acceptance/openstack/compute/v2/servers_test.go
+++ b/acceptance/openstack/compute/v2/servers_test.go
@@ -273,48 +273,41 @@
 	}
 }
 
-func resizeServer(t *testing.T, client *gophercloud.ServiceClient) *servers.Server {
-	choices, err := ComputeChoicesFromEnv()
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	server, err := createServer(t, client, choices)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if err = waitForStatus(client, server, "ACTIVE"); err != nil {
+func resizeServer(t *testing.T, client *gophercloud.ServiceClient, server *servers.Server, choices *ComputeChoices) {
+	if err := waitForStatus(client, server, "ACTIVE"); err != nil {
 		t.Fatal(err)
 	}
 
 	t.Logf("Attempting to resize server [%s]", server.ID)
 
-	if err = servers.Resize(client, server.ID, choices.FlavorIDResize); err != nil {
+	if err := servers.Resize(client, server.ID, choices.FlavorIDResize); err != nil {
 		t.Fatal(err)
 	}
 
-	if err = waitForStatus(client, server, "RESIZE"); err != nil {
+	if err := waitForStatus(client, server, "VERIFY_RESIZE"); err != nil {
 		t.Fatal(err)
 	}
-
-	if err = waitForStatus(client, server, "VERIFY_RESIZE"); err != nil {
-		t.Fatal(err)
-	}
-
-	return server
 }
 
 func TestActionResizeConfirm(t *testing.T) {
 	t.Parallel()
 
+	choices, err := ComputeChoicesFromEnv()
+	if err != nil {
+		t.Fatal(err)
+	}
+
 	client, err := newClient()
 	if err != nil {
 		t.Fatalf("Unable to create a compute client: %v", err)
 	}
 
-	server := resizeServer(t, client)
+	server, err := createServer(t, client, choices)
+	if err != nil {
+		t.Fatal(err)
+	}
 	defer servers.Delete(client, server.ID)
+	resizeServer(t, client, server, choices)
 
 	t.Logf("Attempting to confirm resize for server %s", server.ID)
 
@@ -330,17 +323,22 @@
 func TestActionResizeRevert(t *testing.T) {
 	t.Parallel()
 
+	choices, err := ComputeChoicesFromEnv()
+	if err != nil {
+		t.Fatal(err)
+	}
+
 	client, err := newClient()
 	if err != nil {
 		t.Fatalf("Unable to create a compute client: %v", err)
 	}
 
-	server := resizeServer(t, client)
-	defer servers.Delete(client, server.ID)
-
-	if err = waitForStatus(client, server, "ACTIVE"); err != nil {
+	server, err := createServer(t, client, choices)
+	if err != nil {
 		t.Fatal(err)
 	}
+	defer servers.Delete(client, server.ID)
+	resizeServer(t, client, server, choices)
 
 	t.Logf("Attempting to revert resize for server %s", server.ID)
 
@@ -348,10 +346,6 @@
 		t.Fatal(err)
 	}
 
-	if err = waitForStatus(client, server, "REVERT_RESIZE"); err != nil {
-		t.Fatal(err)
-	}
-
 	if err = waitForStatus(client, server, "ACTIVE"); err != nil {
 		t.Fatal(err)
 	}
diff --git a/openstack/compute/v2/servers/requests.go b/openstack/compute/v2/servers/requests.go
index 9e65817..da93ff1 100644
--- a/openstack/compute/v2/servers/requests.go
+++ b/openstack/compute/v2/servers/requests.go
@@ -49,7 +49,7 @@
 		return p
 	}
 
-	return pagination.NewPager(client, getListURL(client), createPage)
+	return pagination.NewPager(client, getDetailURL(client), createPage)
 }
 
 // Create requests a server to be provisioned to the user in the current tenant.
@@ -100,12 +100,16 @@
 
 // ChangeAdminPassword alters the administrator or root password for a specified server.
 func ChangeAdminPassword(client *gophercloud.ServiceClient, id, newPassword string) error {
+	var req struct {
+		ChangePassword struct {
+			AdminPass string `json:"adminPass"`
+		} `json:"changePassword"`
+	}
+
+	req.ChangePassword.AdminPass = newPassword
+
 	_, err := perigee.Request("POST", getActionURL(client, id), perigee.Options{
-		ReqBody: struct {
-			C map[string]string `json:"changePassword"`
-		}{
-			map[string]string{"adminPass": newPassword},
-		},
+		ReqBody:     req,
 		MoreHeaders: client.Provider.AuthenticatedHeaders(),
 		OkCodes:     []int{202},
 	})
diff --git a/openstack/compute/v2/servers/urls.go b/openstack/compute/v2/servers/urls.go
index 3440de1..7cfda39 100644
--- a/openstack/compute/v2/servers/urls.go
+++ b/openstack/compute/v2/servers/urls.go
@@ -3,11 +3,11 @@
 import "github.com/rackspace/gophercloud"
 
 func getListURL(client *gophercloud.ServiceClient) string {
-	return client.ServiceURL("servers", "detail")
+	return client.ServiceURL("servers")
 }
 
-func getCreateURL(client *gophercloud.ServiceClient) string {
-	return client.ServiceURL("servers")
+func getDetailURL(client *gophercloud.ServiceClient) string {
+	return client.ServiceURL("servers", "detail")
 }
 
 func getServerURL(client *gophercloud.ServiceClient, id string) string {
