Fixed bug in RandomString generation