diff --git a/src/mmu.rs b/src/mmu.rs
index 9b02f33f6fa4d288b2df5852b116701ec162f9dd..d902578d386a7f22e0f8fc17c4bf4dcc3c6fd1b1 100644
--- a/src/mmu.rs
+++ b/src/mmu.rs
@@ -327,7 +327,13 @@ impl Mmu {
                     0x4d => (false as u8) | ((self.speed as u8) << 7),
 
                     // 0xFF50 - Boot active flag
-                    0x50 => u8::from(self.boot_active),
+                    0x50 => {
+                        if self.boot_active {
+                            0x00
+                        } else {
+                            0xff
+                        }
+                    }
 
                     // 0xFF70 - SVBK: WRAM bank (CGB only)
                     0x70 => self.ram_bank & 0x07,
@@ -430,7 +436,7 @@ impl Mmu {
                     }
 
                     // 0xFF50 - Boot active flag
-                    0x50 => self.boot_active = false,
+                    0x50 => self.boot_active = value == 0x00,
 
                     // 0xFF70 - SVBK: WRAM bank (CGB only)
                     0x70 => {
diff --git a/src/state.rs b/src/state.rs
index 068219b88ff145e14f8916a28ae4e69d2bb9d3a8..f953a77ed5fea26438745382c0e368534ca0d784 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -610,7 +610,12 @@ impl BeesCore {
             buffer[1] = b' ';
         }
 
-        buffer[2] = b' ';
+        if gb.is_dmg() {
+            buffer[2] = b'0';
+        } else {
+            buffer[2] = b' ';
+        }
+
         buffer[3] = b' ';
 
         String::from_utf8(Vec::from(buffer)).unwrap()
@@ -877,20 +882,27 @@ impl Default for BeesMbc {
     }
 }
 
-pub fn save_state_file(file_path: &str, gb: &mut GameBoy) {
-    let mut file = File::create(file_path).unwrap();
-    let data = save_state(gb);
+pub fn save_state_file(file_path: &str, gb: &mut GameBoy) -> Result<(), String> {
+    let mut file = match File::create(file_path) {
+        Ok(file) => file,
+        Err(_) => return Err(format!("Failed to open file: {}", file_path)),
+    };
+    let data = save_state(gb)?;
     file.write_all(&data).unwrap();
+    Ok(())
 }
 
-pub fn save_state(gb: &mut GameBoy) -> Vec<u8> {
+pub fn save_state(gb: &mut GameBoy) -> Result<Vec<u8>, String> {
     let mut data: Vec<u8> = vec![];
     BeesState::from_gb(gb).save(&mut data);
-    data
+    Ok(data)
 }
 
 pub fn load_state_file(file_path: &str, gb: &mut GameBoy) -> Result<(), String> {
-    let mut file = File::open(file_path).unwrap();
+    let mut file = match File::open(file_path) {
+        Ok(file) => file,
+        Err(_) => return Err(format!("Failed to open file: {}", file_path)),
+    };
     let mut data = vec![];
     file.read_to_end(&mut data).unwrap();
     load_state(&data, gb)?;