corrected state check