fix slice bounds err