fix use of void *data in callback