fix invalid function call