Accounted for the race conditions between UPSMON and the garbage collector as well as I could.