Fix where clause for different response when a single item is returned