Fixed indexing error

fixed invalid tuple - int operation error. tuple needed to be indexed