fix bug: crash when user selects array size of 1
Merge origin/master