Make sure functions act correctly after close()