Fixed grade comparison logic - both AP and nonAP.