avoid exceeding gp index