fixed random checking