Fix order of truncation and requesting index of tab

Also reformatted for spaces instead of tabs