Well done, that was really close. Annoying when that happens I must admit, but it's a huge step in the right direction, so good for you there.

I find that clearing my mind when I do reality checks helps stop this, if I try and make myself think clearly and do one in a dream, I'm less likely to get distracted and go back to the dream.