Correctly reset row to -1 when loading new pattern.