Fixed indecies error
caused by logical error in joinging sections together