Delete global.detector, fixed #43, #37