fix bugs in executable