diff --git a/x86_64/bootsector.asm b/x86_64/bootsector.asm
index ec1db67c076f3bf99e2b9cb28c26196d5763f7ff..43360badc0e40712968429e9cc25c9bad3033363 100644
--- a/x86_64/bootsector.asm
+++ b/x86_64/bootsector.asm
@@ -21,7 +21,7 @@ boot: ; dl comes with disk
     mov bh, 0
     mov bl, [disk]
 
-    mov ax, (startup_start - boot) / 512
+    mov eax, (startup_start - boot) / 512
     mov bx, startup_start
     mov cx, (startup_end - startup_start) / 512
     xor dx, dx
@@ -58,11 +58,14 @@ load:
 
     jmp load
 .good_size:
-    mov [DAPACK.addr], ax
+    mov [DAPACK.addr], eax
     mov [DAPACK.buf], bx
     mov [DAPACK.count], cx
     mov [DAPACK.seg], dx
 
+    ; mov bx, [DAPACK.addr + 2]
+    ; call print_num
+    ;
     ; mov bx, [DAPACK.addr]
     ; call print_num
     ;
diff --git a/x86_64/startup-common.asm b/x86_64/startup-common.asm
index 2da1fe9059d15f227c61747b8f3031d053938a34..51da486b9ef81fcc0ecf8ced054899c9898cdd3b 100644
--- a/x86_64/startup-common.asm
+++ b/x86_64/startup-common.asm
@@ -23,7 +23,7 @@ kernel_base equ 0x100000
     ; how often do we need to call load and move memory
     mov ecx, kernel_file.length_sectors / buffer_size_sectors
 
-    mov ax, (kernel_file - boot) / 512
+    mov eax, (kernel_file - boot) / 512
     mov edi, kernel_base
     cld
 .lp:
@@ -35,19 +35,21 @@ kernel_base equ 0x100000
         mov bx, kernel_file
         mov dx, 0x0
 
-        push ax
+        push edi
+        push eax
         call load
 
         ; moving buffer
         call unreal
-        pop ax
+        pop eax
+        pop edi
 
         mov esi, kernel_file
         mov ecx, buffer_size_bytes / 4
         a32 rep movsd
 
         ; preparing next iteration
-        add ax, buffer_size_sectors
+        add eax, buffer_size_sectors
 
     pop cx
     loop .lp