Fixed IE8 issue where substr -2 equates to 0 value returning whole strin...

Fixed issue in ie8 where substr of a negative value always returns the zero value resulting in the whole string being returned. Replaced with slice which returns last two values always