fixed a portability issue

missed the alloc declare in a couple of methods..