fixed alarm logic when location is missing at the beginning