fix bug where you cannot insert at the end of a ShortArray
Merge pull request #1789 from FredGithub/master

fix bug where you cannot insert at the end of a ShortArray