Fixed bug that prevented proper logging.