Fix issue where the server can start multiple times