fix log printing errors