Fix for bad alloc?