fix bug on plain types