remove unnecessary conversion and fix an issue about vector