Need to check if the query matches first.