ie8 global adjustment, lastIndexOf fix