fix error with degenerate factors