Fixed a bug in matchCtrl