Actually fix issue with substring