fix passing function index as pointer