Bug fixes for frontend tests.

Change-Id: I57ba84c134e45f0e15486284161f181bae145f51