Fixed multiple conditions query.