Fixed bug when looking for indentation would read off end of array