Fix: Bad usage of String.substring(start, end)