#12 and improvement in detect mode