Fixed bug with index out of range error