I am still probably not seeing the problem
Code:
FOR row = 0 TO 3        ' 4 rows in keypad
In your case
Code:
FOR row = 0 TO 2        ' 3 rows in keypad
Or maybe it is wired wrong...