diff --git a/permission/types/permissions.go b/permission/types/permissions.go
index 3c43ed17bd64c2600d0f6be5292e7d67690ed90e..cca221f86a3feb63610e4a02f468bce616439eec 100644
--- a/permission/types/permissions.go
+++ b/permission/types/permissions.go
@@ -124,7 +124,7 @@ type AccountPermissions struct {
 
 // Returns true if the role is found
 func (aP *AccountPermissions) HasRole(role string) bool {
-	role = string(LeftPadBytes([]byte(role), 32))
+	role = string(RightPadBytes([]byte(role), 32))
 	for _, r := range aP.Roles {
 		if r == role {
 			return true
@@ -135,7 +135,7 @@ func (aP *AccountPermissions) HasRole(role string) bool {
 
 // Returns true if the role is added, and false if it already exists
 func (aP *AccountPermissions) AddRole(role string) bool {
-	role = string(LeftPadBytes([]byte(role), 32))
+	role = string(RightPadBytes([]byte(role), 32))
 	for _, r := range aP.Roles {
 		if r == role {
 			return false
@@ -147,7 +147,7 @@ func (aP *AccountPermissions) AddRole(role string) bool {
 
 // Returns true if the role is removed, and false if it is not found
 func (aP *AccountPermissions) RmRole(role string) bool {
-	role = string(LeftPadBytes([]byte(role), 32))
+	role = string(RightPadBytes([]byte(role), 32))
 	for i, r := range aP.Roles {
 		if r == role {
 			post := []string{}