Attempts to fix a crash due to exceeding a string's bounds