Added thread.setdaemon and fixed startserver