I usually handle these situations well. It doesn't happen often, but most of the time when it does I deal with it nicely.
Worst random encounter was when I ran into the girl I had sex with the day before I started dating my fiance. That was a very awkward thing to explain to her.
Bookmarks