Solve substr stupid issue