Maybe those sort of things can happen because you are subconsciously mad at yourself for some reason. If you can make up and be able to forgive yourself somehow then those 'demons' should disappear. Like sometimes eg. I think of a real nifty question then it evaporates completely from my mind forever ; that's how I subconsciously torment myself -because I am mad at myself for whatever reason.