Failing 2-core algorithm