Wait for the server before rerendering