fix function pointer handling to point to functions