Avoid IndexOutOfBoundsException in when loading page

Bug: 73404
Change-Id: I29ce4a6f682828a1d113246bf63e71b79cb2bec5
Merge "Avoid IndexOutOfBoundsException in when loading page"