The sorcerer hears of Aladdin's good fortune, and returns; he gets his hands on the lamp by tricking Aladdin's wife (who is unaware of the lamp's importance) by offering to exchange "new lamps for old." He orders the genie of the lamp to take the palace, along with all its contents, to his home in the Maghreb. Fortunately, Aladdin still has the magic ring and is able to summon the lesser genie. The genie of the ring cannot directly undo any of the magic of the genie of the lamp, but he is able to transport Aladdin to the Maghreb where, with the help of the "woman's wiles" of the princess he recovers the lamp and slays the sorcerer, returning the palace to its proper place.