Fixed logging bug.