fixed bug with != null WHERE condition