corrected bug for inlet and outlet