fixed mem leak caused by randint... still leak in run()