Same goes for queryHead() function below.