Various fixes (xprime update)