Fix building errors in the tests