If the API is checked as the map is restarting there's a small chance it can return "Match Finished" when it hasn't which can prematurely end a pug (has happened).
To avoid this, when checking if the pug is over, add an additional confirmation by checking the status one more time after a short time period (say 5 or 10s).