Fixed weird behaviour when building ramdisk