Removes useless query