Fixed segfault caused by using type pointers as struct fields.