Fix some error while executing Onion's program
Fix some bugs