fixed bug in run