Update thx.php

Fixed some bugs.