fix expression detection