Fix pointers casting.