Fixed error in unregister host in server factory