Changed gallery condition.