fix condition in type select