fix runtime exception on empty xml