Autonomous vehicles are continually improving, but there’s still some way to go before they fully replace human drivers.

One of the most difficult things automakers and technology companies are dealing with is ensuring that self-driving vehicles can interact with their environment in the way humans do.

Getting a car to stop at a red light is relatively simple; making it “read” pedestrians’ intentions or police officers and pull over when necessary is a little trickier. That last part is, however, not impossible.

Waymo has worked extensively to ensure its autonomous prototypes can recognize police officers and respond to various requests. For example, in January, a Waymo test vehicle pulled up to a darkened stoplight in Tempe, Arizona shortly after power had gone out. A police officer was standing in the intersection directing traffic and the car waited for cross traffic and another vehicle before proceeding through the intersection after being waved on by the officer.

Waymo has also developed software that instructs its vehicles to pull over and stop when it detects flashing police lights behind it.

Also Read: Waymo Publishes Guidelines On How First Responders Should Deal With Self-Driving Cars

Ensuring that self-driving vehicles can interact with police officers, as well as workers at roadway construction sites, is extremely important in ensuring the cars are safe and reliable. And the tech is not up to scratch, as two police officers in California recently experienced, Bloomberg reports.

On a Friday morning back in November, a California Highway Patrol officer started following a Tesla Model S on Route 101 between San Francisco International Airport and Palo Alto. The officer was concerned because the vehicle was traveling at 70 mph (112 km/h) with its turn signal on and passing multiple exits. When the officer pulled alongside the vehicle, he noticed the driver slumped over the steering wheel.

While advanced, Tesla’s Autopilot system doesn’t yet have the ability to pull over when a police vehicle is behind it. Consequently, the officer called for backup. With one officer behind the Model S blocking traffic, the second drove in front of the electric sedan and gradually started to slow down until both vehicles came to a stop.

Tesla chief executive Elon Musk said he was looking into the incident late last year, and a few days ago claimed it would be safe for “somebody to essentially fall asleep and wake up at their destination” by the end of next year.

Will that timeline prove overly ambitious? We’ll have to wait and see but we can say with certainty that future self-driving vehicles won’t be running from police and triggering dangerous pursuits.