Sets correct (original) length after Array::sort. Fixes #146
Merge pull request #152 from tessel/tcr-146

Sets correct (original) length after Array::sort. Fixes #146