Fixed a few bugs in the EFI target.