Fixes for XyJax

Some of the errors are fixed by just rearranging the order of things