بسم الله الرحمن الرحيم
Keeping the Heart Firm on Allāh's Religion

No one is safe from misguidance, so remember to constantly ask Allāh to keep you on the straight path.  It is very importanto to supplicate for steadfastness and uprightness in the religion upto the end of one’s life.  The Prophet (sallahAllāhu alayhi wasallam) used to do so with the following du'ā:

يَا مُقَلِّبَ الْقُلُوبِ ثَبِّتْ قَلْبِى عَلَى دِينِكَ

yā muqallibal quloob thabbit qalbee ‘alā deenik

"Oh turner of the hearts (Allāh, the Most High), keep our hearts firm on Your religion."  [al-Jām'i as-Sagheer 1323/7988]

If you come across someone performing an innovation in the religion (bid'ah), remember to praise Allāh, the Most High, because he hasn't tested you with that innovation.

If Allāh wills, He can seal the heart from guidance.  Abdullāh bin ‘Amr bin al-‘Aas said, that he heard Allaah’s Messenger saying, “All the hearts of the offspring of Ādam are between two fingers of Ar-Rahmān’s Fingers, as one heart.  He turns it (in any direction) as He wills.  Then Allāh’s Messenger said, “O Allāh! The Turner of the hearts, turn our heart towards Your obedience.”  [Saheeh Muslim vol.4, p.1397, no.6418]