fix degree choosing bugs