Fixed logging problem.