Added a change to checkMatch. HORIZ and VERT were switched.