correcting xml errors