fix bugs in runnable/Main