Added syncronized to xml-loading to prevent the two threads from colliding