Altered getRandom to avoid throwing. Now catches exception