[XAPID-1037] fix some minor bugs
diff --git a/api.go b/api.go
index 4720a3e..6b2909f 100644
--- a/api.go
+++ b/api.go
@@ -60,9 +60,9 @@
 	if err != nil {
 		respStatusCode, atoierr := strconv.Atoi(err.Error())
 		if atoierr != nil {
-			w.WriteHeader(respStatusCode)
-		} else {
 			w.WriteHeader(http.StatusInternalServerError)
+		} else {
+			w.WriteHeader(respStatusCode)
 		}
 	}
 
diff --git a/verifyApiKeyStructs.go b/verifyApiKeyStructs.go
index 4c61747..633ca60 100644
--- a/verifyApiKeyStructs.go
+++ b/verifyApiKeyStructs.go
@@ -48,8 +48,8 @@
 }
 
 type Attribute struct {
-	Name  string `json:"Name,omitempty"`
-	Value string `json:"Value,omitempty"`
+	Name  string `json:"name,omitempty"`
+	Value string `json:"value,omitempty"`
 	Kind  string `json:"kind,omitempty"`
 }