Advice;
Make sure the Mae Sai Thai border police stamp re-entry in your passport. Once I found myself in Thailand illegally when I returned from Burma because the Mae Sai border police forgot to stamp my reentry, I did not personally check the process and they gave me the closed passport.
A few weeks later, I faced a very serious problems with immigration Office until 3 days later, I could prove that it was someone else's mistake.
Is not usual but happened to me.