Fix queries on multisite