Fixed #1: Out of range error