fixed lower/uppercase bug on type environments