fixed remote addr middleware