Aha, I had been asking myself why uid was marked as an unused var in IDEA. This fix clears it up and fixes a bug. Nice!