Size MAXAVERAGECLIMBRATESIZE and perform safe array checks