mostly fixes actually allocating the pointers