Fixed syntax error in get_degree