Fix crash in #178

- Ensure that we are using proper fields from target slection

- Removed redundant chunk of port-processing code.