changed handling of source and destination port