Fixed bug in uptest.py. Seems to be accurate now.