When Aladdin found a symbol in front of the pyramid, he hurried walks in, without knowing what it is a trap. To make him fall under the pyramid. While he was walking out that he has met with the treasure room and found the lamp is on the altar. Aladdin saw dust on the lamp he was clean. That makes the alarm genie out of the lamp.