Fixed crash when running msg without a GUI