Fixed indexing error in main-loop.
Conflict resolved?