Updates to make bastat and co work.

Change-Id: Ie9eb4777c5943b9047437742b50a2eb17e598cbf