Fixing $whereCondition query.