Fixed match problem etc

Fixed match problem, distance problem, add more attributes