reinitialisation of state on reopen
minimal cleanup required to avoid blocking problems