remove global instance middleware