@shuangzhou why do you set status twice?

It also happens in line 180-181?