Corrected status function

Corrected status function