Fixed error in random. random outside of array boundaries