Fixed bug of from and to pointers