This is agonizing slow on larger maps.