diff --git a/metar/Datatypes.py b/metar/Datatypes.py
index c1ba23f..201f624 100644
--- a/metar/Datatypes.py
+++ b/metar/Datatypes.py
@@ -480,8 +480,8 @@ class position(object):
         long1 = self.longitude
         lat2 = position2.latitude
         long2 = position2.longitude
-        a = sin(0.5(lat2 - lat1)) + cos(lat1) * cos(lat2) * sin(
-            0.5 * (long2 - long1) ** 2
+        a = (sin(0.5(lat2 - lat1))) ** 2 + cos(lat1) * cos(lat2) * (sin(
+            0.5 * (long2 - long1)) ** 2
         )
         c = 2.0 * atan(sqrt(a) * sqrt(1.0 - a))
         d = distance(earth_radius * c, "M")
diff --git a/metar/Metar.py b/metar/Metar.py
index 9ac23db..bbe3e6e 100644
--- a/metar/Metar.py
+++ b/metar/Metar.py
@@ -43,7 +43,7 @@ TIME_RE = re.compile(
         (?P<min>\d\d)Z?\s+""",
     re.VERBOSE,
 )
-MODIFIER_RE = re.compile(r"^(?P<mod>AUTO|FINO|NIL|TEST|CORR?|RTD|CC[A-G])\s+")
+MODIFIER_RE = re.compile(r"^(?P<mod>AUTO|COR AUTO|FINO|NIL|TEST|CORR?|RTD|CC[A-G])\s+")
 WIND_RE = re.compile(
     r"""^(?P<dir>[\dO]{3}|[0O]|///|MMM|VRB)
         (?P<speed>P?[\dO]{2,3}|[/M]{2,3})

diff --git a/test/test_metar.py b/test/test_metar.py
index 3770baf..08824e6 100644
--- a/test/test_metar.py
+++ b/test/test_metar.py
@@ -602,3 +602,14 @@ def test_not_strict_mode():
     assert report.station_id == "K9L2"
     assert report.vis.value() == 10
     assert report.sky_conditions() == "clear"
+
+
+def test_cor_auto_mod():
+    """Test parsing of a COR AUTO Metar."""
+    code = (
+        "METAR KADW 252356Z COR AUTO 10008KT 10SM CLR 19/11 A2986 "
+        "RMK AO2 SLP117 T01880111 10230 20188 50004 $ COR 0007="
+    )
+    m = Metar.Metar(code, year=2019)
+
+    assert m.mod == 'COR AUTO'

Unparsed groups in body 'AUTO'
I've found some METARS that cannot be parsed because they have 'COR AUTO' immediately following the report time. For instance:

```
>>> from metar.Metar import Metar
>>> Metar('''METAR KADW 252356Z COR AUTO 10008KT 10SM CLR 19/11 A2986
           RMK AO2 SLP117 T01880111 10230 20188 50004 $ COR
           0007=''')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jhaiduce/Development/python-metar/metar/Metar.py", line 499, in __init__
    raise ParserError(message)
metar.Metar.ParserError: Unparsed groups in body 'AUTO' while processing 'METAR KADW 252356Z COR AUTO 10008KT 10SM CLR 19/11 A2986
           RMK AO2 SLP117 T01880111 10230 20188 50004 $ COR
           0007='
```

test/test_metar.py::test_cor_auto_mod
test/test_metar.py::test_xlate_loc test/test_metar.py::test_module test/test_metar.py::test_issue84_trimequals[] test/test_metar.py::test_issue84_trimequals[=] test/test_metar.py::test_issue84_trimequals[= test/test_metar.py::test_issue77_ice_accretion[1] test/test_metar.py::test_issue77_ice_accretion[3] test/test_metar.py::test_issue77_ice_accretion[6] test/test_metar.py::test_issue64_cloudkeyerror test/test_metar.py::test_issue67_precip_text test/test_metar.py::test_issue40_runwayunits test/test_metar.py::test_010_parseType_default test/test_metar.py::test_011_parseType_legal test/test_metar.py::test_020_parseStation_legal test/test_metar.py::test_021_parseStation_illegal test/test_metar.py::test_030_parseTime_legal test/test_metar.py::test_031_parseTime_specify_year test/test_metar.py::test_032_parseTime_specify_month test/test_metar.py::test_033_parseTime_auto_month test/test_metar.py::test_034_parseTime_auto_year test/test_metar.py::test_035_parseTime_suppress_auto_month test/test_metar.py::test_040_parseModifier_default test/test_metar.py::test_041_parseModifier test/test_metar.py::test_042_parseModifier_nonstd test/test_metar.py::test_043_parseModifier_illegal test/test_metar.py::test_140_parseWind test/test_metar.py::test_141_parseWind_nonstd test/test_metar.py::test_issue51_strict test/test_metar.py::test_142_parseWind_illegal test/test_metar.py::test_150_parseVisibility test/test_metar.py::test_151_parseVisibility_direction test/test_metar.py::test_152_parseVisibility_with_following_temperature test/test_metar.py::test_290_ranway_state test/test_metar.py::test_300_parseTrend test/test_metar.py::test_snowdepth test/test_metar.py::test_310_parse_sky_conditions test/test_metar.py::test_not_strict_mode