Fixed an improper second parameter for a substring call