fixed a bug in sparse degree parsing