fix extening query