There’s a joke about a mother who was walking with her daughter along the beach at the water’s edge. Suddenly, a huge wave sweeps the little girl out to sea.

“Oh, G‑d,” laments the mother, turning her face heavenward. “This was my baby—the love and joy of my life. Give her back to me, and I’ll give charity every day for the rest of my life!”

Suddenly, another enormous wave deposits the girl back on the sand. Looking back up to heaven, the mother says, “She had on a hat!”

It’s easy to lose perspective.

There’s the couple who yearned for a baby for many years. Months and years pass, and their aches intensify. When the wife finally becomes pregnant, their joy knows no bounds. But unfortunately, it is short-lived. The couple soon finds themselves bickering about everything—small things, like what color to paint their baby’s bedroom to larger issues, like who will be her caregiver when her parents are away.

Or there are the parents who are overjoyed to hear that their daughter has finally found her soulmate. As they begin to prepare for her wedding day, they become utterly disappointed to learn that the venue they had always dreamed of was booked solid.

Does it sound unreal? It happens all the time.

How often do we pray for a certain outcome? We are overcome with relief and gratitude when our wishes finally materialize. But how long does our satisfaction last? How long does it take until we become irritated with some detail that wasn’t anticipated or some part of our idyllic plan that hasn’t occurred?

In this week’s Torah portion, we read the story of the Jews at the end of their 40-year sojourn in the desert. They are camped by the Jordan River just outside of the Land of Israel.

Over the last several decades, they had gone through so much. They had passed and failed many tests and challenges. They had grown and matured as a people. Finally, they are at the cusp of achieving their dream, ready to cross over into the Promised Land!

And then what happens? They lose perspective.

Israel dwelled in Shittim. And the people began to go astray after the daughters of Moab (Numbers 25:1)

Debauchery, harlotry and idolatry ensue, reaching its peak when finally one man, Pinchas, stands up from the crowd and acts quickly to put an end to the sins.

Losing focus and becoming distracted are all too easy. Even when we are about to achieve our goal, we often stumble because we lose our vision and forget what is truly important.

This week, like Pinchas, let’s focus on rising to the challenge of keeping a proper perspective, even when things don’t go exactly as planned.