fix function call issue