Clean up statestore in case of failure