Additional strdup call to prevent corruption...still needs better memory management though