Fix an issue, add more logging