fix select bug
add completion hook