remove middleware