silver coerces jim into using the map, which can open a portal to any location in the universe, which leads jim to realize this was how flint conducted his raids. the portal to treasure planet is opened, and the group discover the planet is a giant space station which flint commandeered in order to store his loot. as the pirates prepare to collect the loot, jim finds flint's skeleton, holding the missing piece of b.e.n.'s cognitive computer. after reinserting it, b.e.n. immediately remembers that flint rigged the planet to explode upon the treasure's discovery. as the planet falls apart, silver, in a desperate attempt not to leave emptyhanded, tries to escape on a boat loaded with treasure, but sacrifices the treasure to save jim. the survivors escape to the ship, but it is damaged and becomes unable to leave the planet in time. jim rigs a rocket-powered sailboard, and rides ahead of the ship to the portal. at the last moment, jim sets the portal to the montressor spaceport, and he and the crew clear the destruction.