How Challenging Situations Trigger Cognitive Shifts