check state instead of always restarting