getsubstr usage fixed (IOB exceptions)