fix some issues of typing