! Fix error handling on XML preview

It totally did not work.