fix for arr.splice(0)