I had just completed a game and challenged my opponent to a return. He did not respond so I went back to the lobby but then I saw it had been given as a loss against me.
It's not a bug. It's just lag. His acceptance of your challenge was slowly crawling toward you when you quit. There's not a whole lot that the site, itself, can do to ensure an internet that's faster than your reflexes.