Remove some superfluous queries