Fixed out middleware