Fix bug in getitem bounds