fix 'NoneType' object has no attribute 'status'