Fixed domdocument errors