fix call and cast callback macro