Fixed NullPointerException in XMLBuilder