If you are not constantly on your guard, circumstances will work toward your degradation after a dream of filth, either actual or mental.
A fasting and prayer
Quran. 47. Vs. 1. To. 38. 11. Times. For. 3. days