Fixed a bug with struct pointers