bugfix: use the provided server and port in constructor.