Changes from Marian to adapt to the MXA lib