Fixed faulty logging.