finally fixed the bugs in runnable