Fix some bug

header bug
function bug