Remove unnecessary string slicing