PortLib bugfix