Fix error in logging