Fixed passing of struct pointers