diff --git a/classes/imageCommand.js b/classes/imageCommand.js
index 74b2a07..c0db0c5 100644
--- a/classes/imageCommand.js
+++ b/classes/imageCommand.js
@@ -131,4 +131,4 @@ class ImageCommand extends Command {
static command = "";
}
-export default ImageCommand;
\ No newline at end of file
+export default ImageCommand;
diff --git a/natives/motivate.cc b/natives/motivate.cc
index 62feb5b..d8b99ec 100644
--- a/natives/motivate.cc
+++ b/natives/motivate.cc
@@ -43,7 +43,6 @@ Napi::Value Motivate(const Napi::CallbackInfo &info) {
top.fontPointsize(56);
top.read("pango:" + top_text + "");
top.extent(Geometry(bottom_text != "" ? to_string(top.columns()) + "x" +
to_string(top.rows())
@@ -57,7 +56,9 @@ Napi::Value Motivate(const Napi::CallbackInfo &info) {
bottom.font("Times");
bottom.textGravity(Magick::CenterGravity);
bottom.fontPointsize(28);
- bottom.read("pango:" + bottom_text + "");
+ bottom.read("pango:" + top_text + "");
bottom.extent(Geometry(to_string(bottom.columns()) + "x" +
to_string(bottom.rows() + 20)),
"black", Magick::NorthGravity);
@@ -105,4 +106,4 @@ Napi::Value Motivate(const Napi::CallbackInfo &info) {
} catch (...) {
throw Napi::Error::New(env, "Unknown error");
}
-}
\ No newline at end of file
+}
diff --git a/utils/services/image.js b/utils/services/image.js
index 449f45c..f7a20e6 100644
--- a/utils/services/image.js
+++ b/utils/services/image.js
@@ -71,7 +71,7 @@ class ImageWorker extends BaseServiceWorker {
if (connection.conn.readyState !== 0 && connection.conn.readyState !== 1) {
continue;
}
- if (object.params.type && !connection.formats[object.cmd].includes(object.params.type)) continue;
+ if (object.params.type && connection.formats[object.cmd] && !connection.formats[object.cmd].includes(object.params.type)) continue;
idealServers.push({
addr: address,
load: connection.njobs / connection.max