fixed functionality for removing workflow ports
tidy of tsort