fix compile errors for unit test