Fixed IE8 issue where substr -2 equates to 0 value returning whole string. Replaced with slice which returns last two values always