Fix query if no item is available, don't do filtering