fix the match postion when executing max match