Fix bugs in is_close

Global variable $single_point_match_error was misspelled and not declared