fixup ROM loading code