Fixed code path leading to uninitialized variables
Fixed bug on extracting empty text node content