Fixed name-capture bug in type-checking
Use `putUtf8` helper function