Fix factorize for bidigonal matrices