Fixed issue with arrays in where clause