fix side case with n === -1
Merge remote-tracking branch 'origin/master'