Fixed bug: ports not recognised.