Marginalize fix