fixed function call issue