ensure that rendering takes place while we haven't called onDispose()