Fix caret matching.