Added selecting layer.
Modified to support unknown label.