fix function place problem