diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,4 +1,9 @@
 # Changelog for hascard
+## 0.5.0.1
+Fixed bugs:
+- When generating new decks from correct or incorrect cards, 'Nothing' was added as the first line
+- When a gap was the last part of a sentence, the newline was not shown correctly
+
 ## 0.5.0.0
 New:
 - References to files can be added inside cards, such that the corresponding files opens when encountering that card. The file opens in a different window using the default application for opening files of that file type configured on your computer. This can be used to add images to questions. The syntax is described [here](https://github.com/Yvee1/hascard#including-files) in the readme.
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@
 - [Miscellaneous info](#miscellaneous-info)
 
 ## Installation
-Installation on Windows is not possible sadly, aside from WSL. This is because hascard depends on vty which only supports unix operating systems (this includes macOS).
+Installation on Windows is not possible sadly, aside from WSL. This is because hascard depends on vty which only supports UNIX-like operating systems (this includes macOS).
 
 ### Homebrew (for macOS)
 For macOS users an installation using homebrew is provided via a custom tap. You can run 
diff --git a/hascard.cabal b/hascard.cabal
--- a/hascard.cabal
+++ b/hascard.cabal
@@ -4,10 +4,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: 79b1be93322160d8b18065165e9cddfd67acd720d9bb7049de3e40cfdd1f4665
+-- hash: 1d4e635de828a7e15a8bd625beef9e07cce44188802eeaeece13d342c4d94a2b
 
 name:           hascard
-version:        0.5.0.0
+version:        0.5.0.1
 synopsis:       A TUI for reviewing notes using 'flashcards' written with markdown-like syntax.
 description:    Hascard is a text-based user interface for reviewing notes using flashcards. Cards are written in markdown-like syntax. Please see the README file on GitHub at <https://github.com/Yvee1/hascard#readme> for more information.
 category:       Application
@@ -58,11 +58,11 @@
       src
   build-depends:
       base >=4.7 && <5
-    , brick >=0.52.1 && <0.56
+    , brick >=0.52.1 && <0.60
     , containers >0.6.0 && <0.7
     , directory >=1.3.3 && <1.4
     , filepath >=1.4.2 && <1.5
-    , megaparsec >=8.0.0 && <8.1
+    , megaparsec >=8.0.0 && <10
     , microlens >=0.4.11 && <0.5
     , microlens-platform >=0.4.1 && <0.5
     , mwc-random >=0.14 && <0.15
@@ -71,13 +71,13 @@
     , process >=1.6.5 && <1.7
     , random-fu >=0.2.7 && <0.3
     , split >=0.2.3 && <0.3
-    , strict >=0.3.2 && <0.4
+    , strict >=0.3.2 && <0.5
     , tasty >=1.2.1 && <1.3
     , tasty-hunit >=0.10.0 && <0.11
     , tasty-quickcheck >=0.10.1 && <0.11
     , text >=1.2.3 && <1.3
     , vector >=0.12.0 && <0.13
-    , vty >=5.28.2 && <5.31
+    , vty >=5.28.2 && <5.33
     , word-wrap >=0.4.1 && <0.5
   default-language: Haskell2010
 
@@ -90,12 +90,12 @@
   ghc-options: -threaded -rtsopts -with-rtsopts=-N
   build-depends:
       base >=4.7 && <5
-    , brick >=0.52.1 && <0.56
+    , brick >=0.52.1 && <0.60
     , containers >0.6.0 && <0.7
     , directory >=1.3.3 && <1.4
     , filepath >=1.4.2 && <1.5
     , hascard
-    , megaparsec >=8.0.0 && <8.1
+    , megaparsec >=8.0.0 && <10
     , microlens >=0.4.11 && <0.5
     , microlens-platform >=0.4.1 && <0.5
     , mwc-random >=0.14 && <0.15
@@ -104,13 +104,13 @@
     , process >=1.6.5 && <1.7
     , random-fu >=0.2.7 && <0.3
     , split >=0.2.3 && <0.3
-    , strict >=0.3.2 && <0.4
+    , strict >=0.3.2 && <0.5
     , tasty >=1.2.1 && <1.3
     , tasty-hunit >=0.10.0 && <0.11
     , tasty-quickcheck >=0.10.1 && <0.11
     , text >=1.2.3 && <1.3
     , vector >=0.12.0 && <0.13
-    , vty >=5.28.2 && <5.31
+    , vty >=5.28.2 && <5.33
     , word-wrap >=0.4.1 && <0.5
   default-language: Haskell2010
 
@@ -124,12 +124,12 @@
   ghc-options: -threaded -rtsopts -with-rtsopts=-N
   build-depends:
       base >=4.7 && <5
-    , brick >=0.52.1 && <0.56
+    , brick >=0.52.1 && <0.60
     , containers >0.6.0 && <0.7
     , directory >=1.3.3 && <1.4
     , filepath >=1.4.2 && <1.5
     , hascard
-    , megaparsec >=8.0.0 && <8.1
+    , megaparsec >=8.0.0 && <10
     , microlens >=0.4.11 && <0.5
     , microlens-platform >=0.4.1 && <0.5
     , mwc-random >=0.14 && <0.15
@@ -138,12 +138,12 @@
     , process >=1.6.5 && <1.7
     , random-fu >=0.2.7 && <0.3
     , split >=0.2.3 && <0.3
-    , strict >=0.3.2 && <0.4
+    , strict >=0.3.2 && <0.5
     , tasty >=1.2.1 && <1.3
     , tasty-hunit >=0.10.0 && <0.11
     , tasty-quickcheck >=0.10.1 && <0.11
     , text >=1.2.3 && <1.3
     , vector >=0.12.0 && <0.13
-    , vty >=5.28.2 && <5.31
+    , vty >=5.28.2 && <5.33
     , word-wrap >=0.4.1 && <0.5
   default-language: Haskell2010
diff --git a/src/Types.hs b/src/Types.hs
--- a/src/Types.hs
+++ b/src/Types.hs
@@ -36,14 +36,14 @@
 instance Show Card where
   show card = let showHeader h = "# " <> h <> "\n"
     in case card of
-      Definition h img descr -> showHeader h <> show img <> "\n" <> descr
-      OpenQuestion h img p -> showHeader h <> show img <> "\n" <> show p
+      Definition h img descr -> showHeader h <> maybe "" show img <> "\n" <> descr
+      OpenQuestion h img p -> showHeader h <> maybe "" show img <> "\n" <> show p
       MultipleChoice h img c inc -> 
-        showHeader h <> show img <> "\n" <> showMultipleChoice c inc
+        showHeader h <> maybe "" show img <> "\n" <> showMultipleChoice c inc
       MultipleAnswer h img opts ->
-        showHeader h <> show img <> "\n" <> unlines' (NE.toList (NE.map show opts))
+        showHeader h <> maybe "" show img <> "\n" <> unlines' (NE.toList (NE.map show opts))
       Reorder h img elts -> 
-        showHeader h <> show img<> "\n" <> unlines' (NE.toList (NE.map showReorder elts))
+        showHeader h <>maybe "" show img <> "\n" <> unlines' (NE.toList (NE.map showReorder elts))
 
 --              alt   file
 data External = Image String String
diff --git a/src/UI/Cards.hs b/src/UI/Cards.hs
--- a/src/UI/Cards.hs
+++ b/src/UI/Cards.hs
@@ -200,9 +200,10 @@
     let startsWithSpace = head s == ' '
         s' = if startsWithSpace then " " <> replicate padding 'X' <> tail s else replicate padding 'X' ++ s
         lastLetter = last s
+        prefix = if head s `elem` ['\n', '\r'] then T.pack " " else T.empty
         postfix = if lastLetter == ' ' then T.pack [lastLetter] else T.empty
         ts = wrapTextToLines wrapSettings w (pack s') & ix 0 %~ (if startsWithSpace then (T.pack " " `T.append`) . T.drop (padding + 1) else T.drop padding)
-        ts' = ts & _last %~ (`T.append` postfix)
+        ts' = prefix : (ts & _last %~ (`T.append` postfix))
         padding' = textWidth (last ts') + (if length ts' == 1 then 1 else 0) * padding in
           (map txt (filter (/=T.empty) ts'), padding', True)
   else
