Fix bug in query. IN and NOT IN now work normal.