added check on gps end time