xml constructing bug