fixed random errors