Fixed executing state check