Attempt at fixing the substring error that is only occurring on github.