add types for ports
check if error port is attached
fix DRAIN port type