Fixed infinite distance - log bug