Added fix to address the issue where when the server is stopped, and then restarted with the same port, it will throw an error.