Fix various test problem.