fixed bug in `random_data` close #194