This post is also available in: heעברית (Hebrew)

Can a drone choose the place to crash-land? Increasing numbers of drones in the sky are raising the risk to people and property below being hit when those devices have mechanical problems. For this reason, precisely, NASA researchers are building technology to help drones automatically spot the best places to crash-land without hurting anyone on the ground.

Patricia Glaab, an aerospace technologist at NASA Langley Research Center, told fortune.com that she and her fellow NASA colleague and husband, Lou Glaab, have developed crash-landing software for drones. Based on eight test flights, the technology has successfully spotted safer landing zones like swamps or drainage ditches to crash instead of on top of people’s cars, Glaab said.

She first got the idea for the technology in 2015 and received just under $10,000 from NASA to work on it. The initiative comes as businesses increasingly use drones for things like inspecting rooftops or power lines, raising the risk of in-flight mechanical and software problems that could put people below and the drones themselves in danger. “These companies want to potentially send dozens of drones at a time,” Glaab said, referring to businesses like Amazon that want to put entire fleets of drones aloft to deliver orders to customers.

Many companies like China-based drone maker DJI install drones with software that helps the devices sense and avoid obstacles while in flight. But these technologies are not designed for emergency situations, Glaab explained. The software links onboard drone components like batteries and motors to monitor their health. The goal is to identify when something on the drone goes haywire and, if so, put the drone in a sort-of crash-landing mode. When triggered, the software checks a pre-installed database of nearby safe zones that it can then pilot itself toward. Big airlines already use such a national database for emergencies.

NASA’s technology is still far from finished. For instance, Glaab’s team must manually upload the safe-landing database in the drones they test for each location. Although not a laborious process, she said, it is an extra step. Eventually, it may be possible for the drones to connect wirelessly to a national database of safe landing zones, but that’s unlikely to be anytime soon. Glaab is still refining the drone technology and plans on doing more test flights this summer.