Fix bug in type select