diff --git a/src/commands/settings/rolemenu.ts b/src/commands/settings/rolemenu.ts
index 0b41854..9779126 100644
--- a/src/commands/settings/rolemenu.ts
+++ b/src/commands/settings/rolemenu.ts
@@ -418,7 +418,6 @@
                     .setValue("delete")
                     .setEmoji(getEmojiByName("TICKETS.ISSUE", "id") as APIMessageComponentEmoji)
             );
-        console.log(page);
         const buttonRow = new ActionRowBuilder<ButtonBuilder>().addComponents(
             new ButtonBuilder()
                 .setCustomId("back")
@@ -462,7 +461,7 @@
             current = currentObject[page]!;
             embed.setDescription(
                 `**Currently Editing:** ${current.name}\n\n` +
-                    `**Description:**\n> ${current.description}\n` +
+                    `**Description:**\n> ${current.description || "*No description set*"}\n` +
                     `\n\n${createPageIndicator(Object.keys(config.roleMenu.options).length, page)}`
             );
 
@@ -470,7 +469,7 @@
                 currentObject.map((key: ObjectSchema, index) => {
                     return new StringSelectMenuOptionBuilder()
                         .setLabel(ellipsis(key.name, 50))
-                        .setDescription(ellipsis(key.description, 50))
+                        .setDescription(ellipsis(key.description || "No description set", 50))
                         .setValue(index.toString());
                 })
             );
@@ -509,9 +508,13 @@
                 }
                 case "add": {
                     const newPage = await editRoleMenuPage(i, m);
-                    if (_.isEqual(newPage, defaultRoleMenuData)) break;
-                    currentObject.push();
-                    page = currentObject.length - 1;
+                    if (_.isEqual(newPage, defaultRoleMenuData)) {
+                        break;
+                    }
+                    if (newPage) {
+                        currentObject.push(newPage);
+                        page = currentObject.length - 1;
+                    }
                     break;
                 }
                 case "reorder": {
