move startedFlag after server started