[misc] more type constraint, fix include