Invalid port exception handled