Fix casting from and to void*