Fix unit test, compiler warning, and extra include