Slight changes to the StartServer method. The thread handler did not work properly.