fixing data casting issues in xml parser