fixed some issues in match controller