fix ud decomposition and assert