Fix null point exception and rejudge condition in status controller

For #170 and #171