Fix offset error on random string function.