Better handling when server is started, closes #328