As he was preparing to die, the pirate boats were hit by a cyclone and destroyed, and they released him before even worse things happened. Xuanzang visited the sacred sites where the historical Buddha had lived in what had once been the Kingdom of Magadha. At the village of Kasia, he saw the place where the Buddha had entered Nirvana (a kind of heaven). At the great monastery of Nalanda, Xuanzang stayed for five years from 633 to 637 studying the sacred texts. Xuanzang continued down the Ganges to the port of Tamralipti. 